<?php
/**
 * Created by PhpStorm.
 * User: yangfan
 * Date: 2019/11/22
 * Time: 10:33 AM
 */

namespace App\VO;

class VOUtil
{
    /**
     * @param $obj
     * @return array
     */
    public static function toArray($obj)
    {
        $arr = [];
        foreach ($obj as $key => $value) {
            if (is_object($value)) {
                $arr[$key] = self::toArray($value);
            } else {
                $arr[$key] = $value;
            }
        }
        return $arr;
    }
}
